﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.AdminPageBase" %>
<ali:Get ID="Article" Object="Article" InnerID="Request.QueryString['ID']" Validate="True" />
<section data-page="article_edit" data-title="编辑文章" data-id="<%=Article[InnerID]%>" data-type="<%=Article[Type]%>">
	<div class="path1"><span>您的位置：</span><a href="list.aspx" target="ali-navtab">文章列表</a> → <b class="<%=ContentLang%>Font"><%=Article[Title]%></b></div>
	<form action="" class="post">
		<div class="post-body">
			<table class="post-table">
				<tr>
					<th>标题：</th>
					<td><input type="text" name="Title" value="<%=Article[Title]%>" size="60" maxlength="255" class="ali-input ali-input-required <%=ContentLang%>Font"></td>
				</tr>
				<tr>
					<th>类别：</th>
					<td>
						<select name="CategoryID" class="<%=ContentLang%>Font" data-ali-widget="combo" data-tree="true" data-root="0">
							<option value="" data-item="" data-parent="0" data-name="" data-page-generate="" data-page-template="" data-page-id="" data-page-extension="">未指定</option>
							<ali:Tree Object="ArticleCategory">
								<ali:Record>
									<%If Guid.Equals(ID, Article[CategoryID])%>
										<option value="<%=ID%>" data-item="<%=ParentChain%>.<%=InnerID%>" data-parent="<%=ParentChain%>" data-name="<%=Name%>" data-page-generate="<%=PageGenerate%>" data-page-template="<%=PageTemplate%>" data-page-id="<%=PageID%>" data-page-extension="<%=PageExtension%>" selected="selected"><%=Name%></option>
									<%Else%>
										<option value="<%=ID%>" data-item="<%=ParentChain%>.<%=InnerID%>" data-parent="<%=ParentChain%>" data-name="<%=Name%>" data-page-generate="<%=PageGenerate%>" data-page-template="<%=PageTemplate%>" data-page-id="<%=PageID%>" data-page-extension="<%=PageExtension%>"><%=Name%></option>
									<%EndIf%>
									<%=ChildRecords%>
								</ali:Record>
							</ali:Tree>
						</select>
					</td>
				</tr>
				<tr>
					<th>来源：</th>
					<td>
						标题：<input type="text" name="FromLabel" value="<%=Article[FromLabel]%>" size="40" maxlength="255" class="ali-input <%=ContentLang%>Font">
						链接：<input type="text" name="FromLink" value="<%=Article[FromLink]%>" size="40" maxlength="255" class="ali-input">
					</td>
				</tr>
				<tr>
					<th>类型：</th>
					<td>
						<select name="Type" data-ali-widget="combo">
							<option value="Text">文本</option>
							<option value="Picture">图片</option>
							<option value="Audio">音频</option>
							<option value="Video">视频</option>
							<option value="Flash">Flash</option>
							<option value="File">文件</option>
						</select>
					</td>
				</tr>
				<tr style="display:none">
					<th>小图：</th>
					<td>
						<input type="text" name="Thumbnail" value="<%=Article[Thumbnail]%>" size="55" class="ali-input">
						<a class="ali-button ali-uploader">浏览...</a>
						<input type="hidden" name="ThumbnailAllowedType" value="gif|jpg|jpeg|png|bmp">
					</td>
				</tr>
				<tr style="display:none">
					<th>文件：</th>
					<td>
						<input type="text" name="File" value="<%=Article[File]%>" size="60" class="ali-input">
						<button type="button" name="ParsePlayer" class="ali-button">分析</button>
						<select name="PlayerID" class="<%=ContentLang%>Font" data-ali-widget="combo">
							<option value="">-- 播放器 --</option>
							<ali:List Mark="System" Object="Player">
								<ali:Record>
									<%If Guid.Equals(ID, Article[PlayerID])%>
										<option value="<%=ID%>" selected><%=Name%></option>
									<%Else%>
										<option value="<%=ID%>"><%=Name%></option>
									<%EndIf%>
								</ali:Record>
							</ali:List>
						</select>
						<a class="ali-button ali-uploader">浏览...</a>
					</td>
				</tr>
				<tr>
					<th>内容：</th>
					<td>
						<textarea name="Content" data-lang="<%=ContentLang%>" data-instance-id="<%=InstanceID%>" class="editor"><%=HttpUtility.HtmlEncode(Article[Content].ToString())%></textarea>
					</td>
				</tr>
			</table>
		</div>
		<div class="post-footer"><button type="submit" class="ali-button">保 存</button></div>
	</form>
</section>